-
Notifications
You must be signed in to change notification settings - Fork 14k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fix]: Label generation for grouped by
, single metric
time series charts
#3566
Conversation
.reduce((distinct, v) => distinct.add(v), new Set()).size; | ||
// remove the msg key from the label if these conditions are true | ||
const removeMostSignificant = mostSignificant.length === payload.data.length && | ||
distinctMostSignificant === 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of this (complicated) logic in line 103 to 112 we could simplify how we set the removeMostSignificant
flag to:
const removeMostSignificant = slice.formData.metrics.length === 1;
However that would make the label generation depend on the fromData and it would therefore be less generic. Let me know what you think...
Sorry about the confusion, I should have created an issue and assigned it to myself. |
No worries, sorry for all these bugs... naming stuff is hard. |
Oh wait sorry about more confusion, I though this was the duplicate fix for the thing I fixed. I knew I had to close that duplicate fix and just assumed this was the PR, wrong one... |
@mistercrunch reported a change in behavior/bug introduced in #3504
This addresses the issue.